package com.charm.codes.nethard;

import okhttp3.OkHttpClient;

/**
 *
 * @author tools
 * @date 2017/12/11
 */

public class OkHttpFactory {

    static OkHttpClient okHttpClient;

    public static synchronized OkHttpClient create(){
        if (okHttpClient==null) {
            OkHttpClient.Builder builder = new OkHttpClient.Builder();
            okHttpClient=builder.build();
        }
        return okHttpClient;
    }
}
